/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.coupon.entity.Coupon3rdItem
   Module Description   :

   Date Created      : 2011/7/28
   Original Author   : jeffma
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.coupon.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.LazyToOne;
import org.hibernate.annotations.LazyToOneOption;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * @author jeffma
 * 
 */
@javax.persistence.Entity
@javax.persistence.Table(name = "EC_3RD_COUPON_ITEM")
public class Coupon3rdItem extends BaseEntity {

	/** serialVersionUID */
	private static final long serialVersionUID = -7652590018964735485L;

	@Id
	@GeneratedValue(generator = "gen_uuid")
	@GenericGenerator(name = "gen_uuid", strategy = "uuid")
	@Column(name = "ITEM_UUID", length = 32)
	private String uuid;

	@ManyToOne(targetEntity = Coupon3rd.class)
	@JoinColumn(name = "COUPON_UUID", nullable = false)
	@LazyToOne(LazyToOneOption.FALSE)
	private Coupon3rd coupon;
	@Column(name = "COUPON_CODE", length = 10)
	private String code;
	@Column(name = "MEMBER_ID", length = 10)
	private String memberId;
	@Column(name = "ORDER_ID", length = 20)
	private String orderId;
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "USE_DATE")
	private Date useDate;

	/**
	 * @return the uuid
	 */
	public String getUuid() {
		return uuid;
	}

	/**
	 * @param uuid the uuid to set
	 */
	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	/**
	 * @return the coupon
	 */
	public Coupon3rd getCoupon() {
		return coupon;
	}

	/**
	 * @param coupon the coupon to set
	 */
	public void setCoupon(Coupon3rd coupon) {
		this.coupon = coupon;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the memberId
	 */
	public String getMemberId() {
		return memberId;
	}

	/**
	 * @param memberId the memberId to set
	 */
	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	/**
	 * @return the orderId
	 */
	public String getOrderId() {
		return orderId;
	}

	/**
	 * @param orderId the orderId to set
	 */
	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	/**
	 * @return the useDate
	 */
	public Date getUseDate() {
		return useDate;
	}

	/**
	 * @param useDate the useDate to set
	 */
	public void setUseDate(Date useDate) {
		this.useDate = useDate;
	}

}
